package com.danlu.dlsms.model.pub.res;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author wuhaiyang
 */
public class MsgCount implements Serializable {
    private static final long serialVersionUID = -7897100526010764611L;

    private Map<String, Integer> unreadCount;

    private Map<String, Integer> allCount;

    private Map<String, Object> extensionCount;

    public MsgCount () {
        super ();
        unreadCount = new HashMap<> ();
        allCount = new HashMap<> ();
        extensionCount = new HashMap<> ();
    }

    public int unreadCountByType (String msgType) {
        return unreadCount.get (msgType) != null ? unreadCount.get (msgType) : 0;
    }

    public int allCountByType (String msgType) {
        return allCount.get (msgType) != null ? allCount.get (msgType) : 0;
    }

    @Override
    public String toString () {
        return "MsgCount [unreadCount=" + unreadCount + ", allCount=" + allCount + "]";
    }

    public Map<String, Integer> getUnreadCount () {
        return unreadCount;
    }

    public void setUnreadCount (Map<String, Integer> unreadCount) {
        this.unreadCount = unreadCount;
    }

    public Map<String, Integer> getAllCount () {
        return allCount;
    }

    public void setAllCount (Map<String, Integer> allCount) {
        this.allCount = allCount;
    }

    public Map<String, Object> getExtensionCount () {
        return extensionCount;
    }

    public void setExtensionCount (Map<String, Object> extensionCount) {
        this.extensionCount = extensionCount;
    }
}